<?php



namespace App\Http\Requests\ApiV2;

use Carbon\Carbon;
use Illuminate\Support\Facades\Auth;

class RewardRequest extends BaseRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'title' => 'required',
            'point' => 'required',



        ];
    }

    public function messages()
    {
        return [
            'point.required' => __('请输入积分'),
            'title.required' => __('请输入标题'),
        ];
    }

    public function filldata()
    {
        $userId =  Auth::id();
        return [
            'user_id' => Auth::id(),
            'point' => $this->input('point'),
            'title' => $this->input('title'),

        ];
    }
}
